package com.baizhi.service.impl;

import com.baizhi.dao.CmfzAudioDao;
import com.baizhi.entity.CmfzAudio;
import com.baizhi.service.CmfzAudioService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CmfzAudioServiceImpl implements CmfzAudioService {
    @Autowired
    private CmfzAudioDao cmfzAudioDao;
    @Override
    public List<CmfzAudio> selectByAlbumId(int albumId) {
        //根据音频所属的专辑id查询   准备查询条件对象
        QueryWrapper<CmfzAudio> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("album_id",albumId);
        List<CmfzAudio> cmfzAudios = cmfzAudioDao.selectList(queryWrapper);
        return cmfzAudios;
    }
}
